/*
 * mycalibration.h
 *
 *  Created on: Mar 12, 2013
 *      Author: rdu
 */

#ifndef MYCALIBRATION_H_
#define MYCALIBRATION_H_

#include <vector>
//#include <stdio.h>

#include "opencv2/calib3d/calib3d.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"

using namespace std;
using namespace cv;

class MyCalib
{
public:
	MyCalib();
	~MyCalib();

public:
	bool Calib3Cameras( vector<vector<Point2f> > imagePoints1,
            vector<vector<Point2f> > imagePoints2,
            vector<vector<Point2f> > imagePoints3,
            Size imageSize, Size boardSize,
            float squareSize, float aspectRatio,
            int flags,
            Mat& cameraMatrix1, Mat& distCoeffs1,
            Mat& cameraMatrix2, Mat& distCoeffs2,
            Mat& cameraMatrix3, Mat& distCoeffs3,
            Mat& R12, Mat& T12, Mat& R13, Mat& T13);

private:
	void PrepImages();
	void CalcChessboardCorners(Size boardSize, float squareSize, vector<Point3f>& corners);

};


#endif /* MYCALIBRATION_H_ */
